So in this instruction,$ sp is the stack pointer ( it's an alias for$ 1). 所以在这个指令中,$sp是堆栈指针(它是$1的别名)。
Next, the current stack frame pointer is stored as the back pointer for the next stack frame, even though you haven't established the stack frame yet ( this is done through negative offsets). 接下来,当前堆栈框架指针会被存储为指向下一个堆栈框架的后向指针,虽然尚未建立堆栈框架(这是通过负的偏移量实现的)。
On Solaris, this sample code allows you to get the stack pointer 在Solaris,下面这段示例代码让您可以获取堆栈指针
So you simply need to move the stack pointer by adding the stack frame size to the stack pointer using ai$ sp,$ sp, FRAME_SIZE. 所以您只需通过使用ai$sp,$sp,FRAMESIZE将堆栈框架大小加到堆栈指针来移动堆栈指针即可。
Getting the stack pointer on Linux-x86 can be implemented as 在Linux-x86平台上的堆栈指针可以实现为
If you open the application and click around, you'll see our history stack and pointer stored in the browser's cookies. 打开应用程序并单击链接,就会看到存储在浏览器cookie中的历史堆栈和指针。
If a function is executing, then the stack pointer is pointing to the top of the whole stack, which is also the top of that function's activation record. 如果一个函数正在执行,那么堆栈指针就会指向整个堆栈的顶部,这也是该函数活动记录的顶部。
The stack pointer tells you where the end of your current stack frame is. 堆栈指针给出的是当前堆栈框架的结束位置。
The final item in the stack frame is a pointer to the previous stack frame, often called the back pointer. 堆栈帧中的最后一个条目是一个指向前一堆栈帧的指针,通常被称为后向指针(backpointer)。
The calling function must not care where the stack pointer is currently pointing. 调用的函数一定不能顾虑栈指针当前所指的位置。
Working in conjunction with our stack, we'll have a pointer that identifies our current position in the stack. 与堆栈在一起的还有一个指针,指示我们在堆栈中的当前位置。
All subsequent arguments are accessed by adding the size of a dword variable to the stack pointer ( that is, esp+ 12, esp+ 16, and so on). 在堆栈指针上加上双字变量的大小(即esp+12、esp+16等等),就可以访问所有后续参数。
Finally, the stack pointer is moved to reserve all the needed stack space using the instruction ai$ sp,$ sp,-FRAME_SIZE. 最后,移动堆栈指针来通过指令ai$sp,$sp,-FRAMESIZE保留所有所需的堆栈空间。
This will lead to better stack tracebacks, as the frame pointer register is used as a frame pointer rather than a general purpose register. 这将产生更好的堆栈回溯,因为帧指针寄存器被用作帧指针而不是通用寄存器。
This makes it easy for functions to know where their activation record is& they are simply defined in terms of the stack pointer. 这对函数了解自己的活动记录在什么地方提供了方便&它们可以使用堆栈指针的形式简单地进行定义。
This will save the old stack pointer and allocate stack memory atomically. 这会保存原来的堆栈指针,并自动分配堆栈内存。
Each stack frame holds a pointer to the previous stack frame ( called the back chain pointer), as well as a space for return addresses for when it calls other functions. 每个堆栈框架都有一个指向前一个堆栈框架的指针(称为回链指针),还有一个当它调用其他函数时用于存放返回地址的空间。
We've already discussed the stack ( an array), and the pointer. 前面已经讨论了堆栈(数组)和指针。
Inline assembly can be written to determine the stack pointer. 可以编写内联程序集(inlineassembly)来确定栈指针。
Therefore, functions using the simplified ABI actually can save, use, and restore non-volatile registers by using negative offsets from the stack pointer. 因此,使用简化ABI的函数实际上可以通过从堆栈指针开始的负偏移量来保存、使用和恢复非易失性寄存器。
This protects against stack, buffer, and function pointer overflows, all without recompilation. 这样将保护程序代码避免堆栈、缓冲区和函数指针溢出,而且全都不需重新编译。
As we click around in the application, new events will be pushed onto the top of the stack, and the pointer will identify the last element added. 当我们在应用程序中单击的时候,新的事件将被压入堆栈顶部,指针指向最后添加的元素。
Functions are free to use the288 bytes that are physically below the stack pointer for functions that do not call other functions. 函数可以自由使用288字节的内存,对于不调用其他函数的函数来说,这段内存物理上在堆栈指针之下。
This lives in the general RAM ( random-access memory) area, but has direct support from the processor via its stack pointer. 驻留于常规RAM(随机访问存储器)区域,但可通过它的堆栈指针获得处理的直接支持。
The stack pointer is moved down to create new memory and moved up to release that memory. 堆栈指针若向下移,会创建新的内存;若向上移,则会释放那些内存。
The stack pointer is not used at all in the function and changing its value is meaningless. 堆栈指针根本不能这样使用,改变它的值是无意义的。
These instructions assume the existence of a stack pointer, for which R13 is used. 这些说明所使用的假设存在一个堆栈指针,为此,R13类的。
NET CLR. The virtual machine is used to maintain the run-time environment which is composed of code section, frame stack, function stack, constant section, instruction pointer, etc and control the executing of program. NETCLR的思想,用虚拟机维护由代码区、框架栈、函数运行栈、常量区和指令计数器等共同构成的运行时环境,控制程序的执行。
The virtual machine maintains the run-time environment, which is composed of code section, data section, function calling stack, operand stack, instruction pointer, etc. All that is good to the executing and the debugging of program. 并用虚拟机维护由代码区、数据区、函数调用栈、操作数栈和指令计数器等共同构成的运行时环境,控制程序的执行,有利于实现调试功能。
The stack protocol used smart pointer to ensure when a pointer not used, the memory it point to can be released automatically. 协议栈使用了智能指针来保证当指针不再使用时,能够自动释放掉。